﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AutoTest.Framework.Pager;

namespace AutoTest.Business.Dto.Goods
{
    /// <summary>
    /// 商品查询Dto
    /// </summary>
    public class GoodsSearchDto
    {
        /// <summary>
        /// 模糊搜索关键字
        /// </summary>
        public string Keyword { get; set; } = string.Empty;
    }

    /// <summary>
    /// 商品分页查询Dto
    /// </summary>
    public class GoodsPageSearchDto : GoodsSearchDto, IPagedSearchDto
    {
        private int _pageIndex = 1;

        /// <summary>
        /// 页码
        /// </summary>
        public int PageIndex
        {
            get { return _pageIndex; }
            set { _pageIndex = value > 0 ? value : 1; }
        }

        private int _pageSize = 20;

        /// <summary>
        /// 每页大小
        /// </summary>
        public int PageSize
        {
            get { return _pageSize; }
            set { _pageSize = value > 0 ? value : 20; }
        }

    }
}
